<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>

</h:head>
<body>
	<h:form id="frmCadPauta">
		<br />
		<h3 style="margin-top: 0">CADASTRO DA PAUTA</h3>
		<div align="left">
			<p:commandButton value="Novo" actionListener="#{pautaBean.novo}"
				ajax="frmCadPauta" />

			<p:commandButton value="Salvar" disabled="#{pautaBean.sal}"
				actionListener="#{pautaBean.salvar}" ajax="frmCadPauta" />

			<p:commandButton value="Alterar" disabled="#{pautaBean.alt}"
				actionListener="#{pautaBean.alterar}" ajax="frmCadPauta" />

			<p:commandButton value="Excluir" disabled="#{pautaBean.rem}"
				actionListener="#{pautaBean.remover}" ajax="frmCadPauta" />

			<p:commandButton id="consulta" value="Consulta"
				action="#{pesquisaPautaBean.abrirDialogo}">
				<p:ajax event="dialogReturn" listener="#{pautaBean.pautaSelecionado}" update="frmCadPauta"/>
			</p:commandButton>

			<p:commandButton value="Cancelar"
				actionListener="#{pautaBean.cancelar}" ajax="grid" />
			<p:messages id="messages" showDetail="true" autoUpdate="true"
				closable="true" />

			<ui:include src="/privado/fiscal/panel/pautaPanel.xhtml" />
			<ui:include src="/privado/fiscal/dataTable/pautaDataTable.xhtml" />

			<p:dialog id="dialog2" header="Inclusão e Edição da Vigência"
				widgetVar="dlg2" modal="true" height="250" width="380">
				<h:panelGrid id="gridincEdi2" columns="1">
					<h:panelGrid id="gridIncEdi" columns="2"
						columnClasses="label, value">
				
					Código da Pauta:
					<p:inputText id="idPautaMVA" disabled="true"
							value="#{pautaBean.pautaMVA.idPautaMVA}" />
		
					Descrição:
					<p:inputText id="descPautaMVA"
							value="#{pautaBean.pautaMVA.descricao}" size="40" />
					
					Valor Pauta:
					<p:inputText id="valorPautaPautaMVA"
							value="#{pautaBean.pautaMVA.valorPauta}" size="20" />
					
					Valor MVA:
					<p:inputText id="pautaValorMva"
							value="#{pautaBean.pautaMVA.valorMVa}" size="20" />
					
					Vigência:
					<p:calendar id="pautavigencia"
							value="#{pautaBean.pautaMVA.vigencia}" effect="fold" />
					</h:panelGrid>
					<h:panelGrid columns="6" columnClasses="label, value">
					Incide Desconto:
					<p:selectBooleanCheckbox id="descontoPauta"
							value="#{pautaBean.pautaMVA.nincideDesconto}" />
					
					Incide IPI:
					<p:selectBooleanCheckbox id="IpiPauta"
							value="#{pautaBean.pautaMVA.incideIPI}" />
							
					MVA Ajustada:
					<p:selectBooleanCheckbox id="pautaMvaAjustada"
							value="#{pautaBean.pautaMVA.mvaAjustada}" />
					</h:panelGrid>
				</h:panelGrid>
				<p:commandButton value="Incluir"
					actionListener="#{pautaBean.incluirPautaMVA}" update="gridPautaMVA" />
			</p:dialog>
		</div>
	</h:form>
</body>
</html>
